<template>
	<view class="my-search-container" :style="{ 'background-color': bgcolor}" @click="serchBoxnHandler">
		<view class="my-search-box" :style="{ 'border-radius': radius + 'px'}">
			<uni-icons type="search" size="17"></uni-icons>
			<text class="placeholder"> 搜 索</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"my-search",
		data() {
			return {
			
			};
		},
		props: {
			// 背景颜色
			bgcolor: {
				type: String,
				default: '#FA516B'
			},
			radius: {
				type: String,
				default: '15'
			}
		},
		methods: {
			serchBoxnHandler () {
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss">
	.my-search-container {
		background-color: #FA516B;
		height: 50px;
		padding: 0 10px;
		display: flex;
		align-items: center;
	}
	
	.my-search-box {
		background-color: #fff;
		width: 100%;
		height: 35px;
		border-radius: 15px;
		text-align: center;
		line-height: 35px;
		
		.placeholder {
			font-size: 15px;
		}
	}
</style>
